package com.health.review.service.impl;

import java.util.List;
import com.health.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.health.review.mapper.ContentReviewMapper;
import com.health.review.domain.ContentReview;
import com.health.review.service.IContentReviewService;

/**
 * 资讯审核Service业务层处理
 * 
 * @author moxxie
 * @date 2025-11-02
 */
@Service
public class ContentReviewServiceImpl implements IContentReviewService 
{
    @Autowired
    private ContentReviewMapper contentReviewMapper;

    /**
     * 查询资讯审核
     * 
     * @param articleId 资讯审核主键
     * @return 资讯审核
     */
    @Override
    public ContentReview selectContentReviewByArticleId(Long articleId)
    {
        return contentReviewMapper.selectContentReviewByArticleId(articleId);
    }

    /**
     * 查询资讯审核列表
     * 
     * @param contentReview 资讯审核
     * @return 资讯审核
     */
    @Override
    public List<ContentReview> selectContentReviewList(ContentReview contentReview)
    {
        return contentReviewMapper.selectContentReviewList(contentReview);
    }

    /**
     * 新增资讯审核
     * 
     * @param contentReview 资讯审核
     * @return 结果
     */
    @Override
    public int insertContentReview(ContentReview contentReview)
    {
        return contentReviewMapper.insertContentReview(contentReview);
    }

    /**
     * 修改资讯审核
     * 
     * @param contentReview 资讯审核
     * @return 结果
     */
    @Override
    public int updateContentReview(ContentReview contentReview)
    {
        contentReview.setUpdateTime(DateUtils.getNowDate());
        return contentReviewMapper.updateContentReview(contentReview);
    }

    /**
     * 批量删除资讯审核
     * 
     * @param articleIds 需要删除的资讯审核主键
     * @return 结果
     */
    @Override
    public int deleteContentReviewByArticleIds(Long[] articleIds)
    {
        return contentReviewMapper.deleteContentReviewByArticleIds(articleIds);
    }

    /**
     * 删除资讯审核信息
     * 
     * @param articleId 资讯审核主键
     * @return 结果
     */
    @Override
    public int deleteContentReviewByArticleId(Long articleId)
    {
        return contentReviewMapper.deleteContentReviewByArticleId(articleId);
    }
}
